/// 当前页结果集
class ClientUserPageReponseDto {
  /// 用户ID
  final int? id;
  /// 用户名
  final String? userName;
  /// 邮箱
  final String? email;
  /// 电话号码
  final String? phone;
  /// 成交总奈拉数，包含被赎回奈拉数
  final int? totalDealNaira;
  /// 有效成交总奈拉数，不包含被赎回奈拉数
  final int? effectiveDealNaira;
  /// 赎回奈拉数
  final int? redemptionNaira;
  /// 赎回率
  final String? redemptionRate;
  /// 用户等级
  final String? levelName;
  /// 启用状态，1：正常，0：停用
  final int? status;
  /// 账户冻结状态，1-已冻结，0-未冻结
  final int? frozen;
  /// 注册时间
  final String? createTime;
  /// 最后上线时间
  final String? lastOnlineTime;
  /// 登录请求来源：1-Android 2-iOS 3-webapp
  final int? fromSource;

  ClientUserPageReponseDto({
    this.id,
    this.userName,
    this.email,
    this.phone,
    this.totalDealNaira,
    this.effectiveDealNaira,
    this.redemptionNaira,
    this.redemptionRate,
    this.levelName,
    this.status,
    this.frozen,
    this.createTime,
    this.lastOnlineTime,
    this.fromSource,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (id != null) data['id'] = id;
    if (userName != null) data['userName'] = userName;
    if (email != null) data['email'] = email;
    if (phone != null) data['phone'] = phone;
    if (totalDealNaira != null) data['totalDealNaira'] = totalDealNaira;
    if (effectiveDealNaira != null) data['effectiveDealNaira'] = effectiveDealNaira;
    if (redemptionNaira != null) data['redemptionNaira'] = redemptionNaira;
    if (redemptionRate != null) data['redemptionRate'] = redemptionRate;
    if (levelName != null) data['levelName'] = levelName;
    if (status != null) data['status'] = status;
    if (frozen != null) data['frozen'] = frozen;
    if (createTime != null) data['createTime'] = createTime;
    if (lastOnlineTime != null) data['lastOnlineTime'] = lastOnlineTime;
    if (fromSource != null) data['fromSource'] = fromSource;
    return data;
  }

  factory ClientUserPageReponseDto.fromJson(Map<String, dynamic> json) {
    return ClientUserPageReponseDto(
      id: json['id'],
      userName: json['userName'],
      email: json['email'],
      phone: json['phone'],
      totalDealNaira: json['totalDealNaira'],
      effectiveDealNaira: json['effectiveDealNaira'],
      redemptionNaira: json['redemptionNaira'],
      redemptionRate: json['redemptionRate'],
      levelName: json['levelName'],
      status: json['status'],
      frozen: json['frozen'],
      createTime: json['createTime'],
      lastOnlineTime: json['lastOnlineTime'],
      fromSource: json['fromSource'],
    );
  }
}